package algo.astar;

import algo.Node;

/**
 *
 * @author robin
 */
public class AStarNode {
    private Node node;
    private AStarNode parent;
    private double g;
    private double h;

    public AStarNode(Node node, double g, double h) {
        this.node = node;
        this.g = g;
        this.h = h;
    }

    public double getG() {
        return g;
    }

    public void setG(double g) {
        this.g = g;
    }

    public double getH() {
        return h;
    }

    public void setH(double h) {
        this.h = h;
    }

    public AStarNode getParent() {
        return parent;
    }

    public void setParent(AStarNode parent) {
        this.parent = parent;
    }

    public int getBlock() {
        return node.block;
    }

    public Node getNode() {
        return node;
    }

    public double getF() {
        return g + h;
    }
}
